<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title></title>
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet" href="css/swiper.min.css">
		<style>
			body {
				margin: 0;
				padding: 0;
			}

			.swiper-container {
				width: 500px;
				height: 300px;
				margin:20px auto;
			}

			.swiper-slide {
				background-color: #ccc;
				display: flex;
				justify-content: center;
				align-items: center;
			}
		</style>
	</head>
	<body>
		<div class="swiper-container">
			<div class="swiper-wrapper">
				<div class="swiper-slide">第1页</div>
				<div class="swiper-slide">第2页</div>
				<div class="swiper-slide">第3页</div>
				<div class="swiper-slide">第4页</div>
				<div class="swiper-slide">第5页</div>
			</div>
			<div class="swiper-pagination"></div>  
			<div class="swiper-button-prev swiper-button-white"></div>
			<div class="swiper-button-next swiper-button-black"></div>
		</div>
		<script src="js/swiper.min.js"></script>
		<script>
			var swiper = new Swiper(".swiper-container", {
				pagination:".swiper-pagination",
				paginationClickable: true, 
				spaceBetween: 20,
					
				prevButton:".swiper-button-prev",
				nextButton:".swiper-button-next",
				grabCursor:true,
				
				keyboardControl:true,     //开启键盘左右键控制
				mousewheelControl:true,    //开启鼠标滚轮控制
				// direction:"vertical",     //滚轮控制适合用在上下轮播的场景
				autoplay:2000,             //自动轮播
				// loop:true,        //回到第一页的时候没有不同效果
				autoplayDisableOnInteraction:true,   //自动轮播时鼠标点击将停止自动
				
			});
		</script>
	</body>
</html>
